Unfortunately at the moment 100% operation of the automatic locking is not guaranteed. This is due to the internal architecture of OS Android and its nuances when dealing with processes.
To be completely sure that the application will not remain open after the specified time strongly suggest using the option of closing the application instead of auto-locking.